package com.dst.service.impl;

import com.dst.dao.BrandDao;
import com.dst.dao.impl.BrandDaoimpl;
import com.dst.eneity.Brand;
import com.dst.service.BrandService;

import java.util.List;

public class BrandServiceImpl implements BrandService {
    BrandDao brandDao=new BrandDaoimpl();
    @Override
    public List<Brand> selectAllBrandService() {
        return brandDao.selectAllBrandDao();
    }

    @Override
    public void addBrandService(Brand brand) {
        brandDao.addBrandDao(brand);
    }

    @Override
    public Brand selectnameBrandService(String pinpai) {
        return brandDao.selectPinpai(pinpai);
    }

    @Override
    public void deleteByIdBrandService(int id) {
        brandDao.deleteBrandDao(id);
    }

    @Override
    public Brand selectidBrandService(int id) {
        return brandDao.selectPinpai(id);
    }

    @Override
    public List<Brand> selectBrand() {
        return brandDao.selectAllBrand();
    }
}
